<div>
  <nz-modal
    (nzAfterOpen)="initForm()"
    [nzClosable]="false"
    nzWidth="680px"
    nzWrapClassName="vertical-center-modal"
    [nzContent]="modalContent"
    [(nzVisible)]="visiable" [nzTitle]="isEdit()?'Edit':'Add'" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
    <ng-template #modalContent>
      <form nz-form [formGroup]="validateForm" (ngSubmit)="handleOk()" >





        <#list  columns as field>
          <#if field_index %2==0>
        <div nz-row [nzGutter]="24">
          <div nz-col [nzSpan]="12">
            <nz-form-item>
              <nz-form-label [nzSm]="10" [nzXs]="24" nzRequired nzFor="${field.columnName!}">${field.columnName!}</nz-form-label>
              <nz-form-control [nzSm]="14" [nzXs]="24" [nzErrorTip]="${field.columnName!}Errtip" nzValidatingTip="checking">
                <input nz-input   formControlName="${field.columnName!}"  />
                <ng-template #${field.columnName!}Errtip let-control>
                  <ng-container *ngIf="control.hasError('required')">${field.columnName!} is required</ng-container>
                </ng-template>
              </nz-form-control>
            </nz-form-item>
          </div>
            <#if !field_has_next>
          </div>
            </#if>
          <#else>
          <div nz-col [nzSpan]="12">
            <nz-form-item>
              <nz-form-label [nzSm]="10" [nzXs]="24" nzRequired nzFor="${field.columnName!}">${field.columnName!}</nz-form-label>
              <nz-form-control [nzSm]="14" [nzXs]="24" [nzErrorTip]="${field.columnName!}Errtip" nzValidatingTip="checking">
                <input nz-input   formControlName="${field.columnName!}"  />
                <ng-template #${field.columnName!}Errtip let-control>
                  <ng-container *ngIf="control.hasError('required')">${field.columnName!} is required</ng-container>
                </ng-template>
              </nz-form-control>
            </nz-form-item>
            </div>
            </div>
          </#if>
        </#list>
      </form>
    </ng-template>
  </nz-modal>
</div>
